home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / mac / euro-oztex / EOT2.1#3.sea.bin / TeX-inputs / STY / graphpap.sty < prev    next >
Text File  |  1995-01-04  |  3KB  |  95 lines

  1. %% 
  2. %% This is file `graphpap.sty', generated 
  3. %% on <1995/1/4> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% graphpap.dtx  (with options: `package')
  8. %% 
  9. %% Copyright 1994 the LaTeX3 project and the individual authors. 
  10. %% All rights reserved. For further copyright information see the file 
  11. %% legal.txt, and any other copyright indicated in this file. 
  12. %% 
  13. %% This file is part of the LaTeX2e system. 
  14. %% ---------------------------------------- 
  15. %% 
  16. %% This system is distributed in the hope that it will be useful, 
  17. %% but WITHOUT ANY WARRANTY; without even the implied warranty of 
  18. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  19. %% 
  20. %% 
  21. %% IMPORTANT NOTICE: 
  22. %% 
  23. %% For error reports in case of UNCHANGED versions see bugs.txt. 
  24. %% 
  25. %% Please do not request updates from us directly. Distribution is 
  26. %% done through Mail-Servers and TeX organizations. 
  27. %% 
  28. %% You are not allowed to change this file. 
  29. %% 
  30. %% You are allowed to distribute this file under the condition that 
  31. %% it is distributed together with all files mentioned in manifest.txt. 
  32. %% 
  33. %% If you receive only some of these files from someone, complain! 
  34. %% 
  35. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  36. %% ALLOWED to take money for the distribution or use of either this 
  37. %% file or a changed version, except for a nominal charge for copying 
  38. %% etc. 
  39. %%
  40. %% File `graphpap.dtx'.
  41. %% Copyright (C) 1994 by Leslie Lamport
  42. %%                       all rights reserved.
  43. %%
  44. \NeedsTeXFormat{LaTeX2e}
  45. \ProvidesPackage{graphpap}
  46.       [1994/08/09 v1.0c Standard LaTeX graphpap package (LL)]
  47. \let\c@@grid\count@
  48. \def\@vgrid(#1,#2)#3#4#5{%
  49.   \setcounter{@grid}{#1}%
  50.   \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}%
  51.   \multiput(#1,#2)(#3,0){#4}{\@vgridnumber{#3}}}
  52. \def\@vgridnumber#1{%
  53.   \makebox(0,0)[t]{%
  54.     \shortstack{\rule{0pt}{10pt}\\\arabic{@grid}}}%
  55.   \addtocounter{@grid}{#1}}
  56. \def\@nonumvgrid(#1,#2)#3#4#5{%
  57.   \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}}
  58. \def\@hgrid(#1,#2)#3#4#5{%
  59.   \setcounter{@grid}{#2}%
  60.   \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}%
  61.   \multiput(#1,#2)(0,#3){#4}{\@hgridnumber{#3}}}
  62. \def\@hgridnumber#1{%
  63.   \makebox(0,0)[r]{\arabic{@grid}\hspace{10pt}}%
  64.   \addtocounter{@grid}{#1}}
  65. \def\@nonumhgrid(#1,#2)#3#4#5{%
  66.   \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}}
  67. \newcommand\graphpaper[1][10]{\leavevmode\@grid{#1}}
  68. \def\@grid#1(#2,#3)#4{\@grid@i{#1}{#2}{#3}(}
  69. \def\@grid@i#1#2#3(#4,#5){%
  70.   \@tempcnta=#4\relax
  71.   \divide\@tempcnta#1\relax
  72.   \advance\@tempcnta1\relax
  73.    {\thinlines\@nonumvgrid(#2,#3){#1}{\@tempcnta}{#5}
  74.     \@tempcnta#4\relax
  75.     \divide\@tempcnta5\relax
  76.     \divide\@tempcnta#1\relax
  77.     \advance\@tempcnta1\relax
  78.     \@tempcntb5\relax
  79.     \multiply\@tempcntb#1\relax
  80.     \thicklines\@vgrid(#2,#3){\@tempcntb}{\@tempcnta}{#5}
  81.     \@tempcnta#5\relax
  82.     \divide\@tempcnta #1\relax
  83.     \advance\@tempcnta1\relax
  84.     \thinlines\@nonumhgrid(#2,#3){#1}{\@tempcnta}{#4}
  85.     \@tempcnta#5\relax
  86.     \divide\@tempcnta5\relax
  87.     \divide\@tempcnta#1\relax
  88.     \advance\@tempcnta1\relax
  89.     \thicklines\@hgrid(#2,#3){\@tempcntb}{\@tempcnta}{#4}}%
  90.   \ignorespaces}
  91.  
  92. \endinput
  93. %% 
  94. %% End of file `graphpap.sty'.
  95.